Skip to content

ref: Enable the allow_attributes lint and fix violations#1257

Open
szokeasaurusrex wants to merge 2 commits into
masterfrom
szokeasaurusrex/disallow-allow
Open

ref: Enable the allow_attributes lint and fix violations#1257
szokeasaurusrex wants to merge 2 commits into
masterfrom
szokeasaurusrex/disallow-allow

Conversation

@szokeasaurusrex

Copy link
Copy Markdown
Member

The allow_attributes lint disallows using #[allow], forcing to use #[except] instead. #[except] is generally better than #[allow] because #[expect] errors if the expectation is unfulfilled, meaning that we don't have stale annotations floating around the codebase.

This also fixes the violations by:

  • Removing #[allow] completely where it is not needed
  • Fixing the underlying violation, when this can be done trivially, and/or where we cannot use allow becuase the lint only triggers on some compilation targets
  • Replacing #[allow] with #[expect]

Resolves #1256
Resolves RUST-267

The [`allow_attributes`](https://rust-lang.github.io/rust-clippy/master/#allow_attributes) lint disallows using `#[allow]`, forcing to use `#[except]` instead. `#[except]` is generally better than `#[allow]` because `#[expect]` errors if the expectation is unfulfilled, meaning that we don't have stale annotations floating around the codebase.

This also fixes the violations by:
  - Removing `#[allow]` completely where it is not needed
  - Fixing the underlying violation, when this can be done trivially, and/or where we cannot use `allow` becuase the lint only triggers on some compilation targets
  - Replacing `#[allow]` with `#[expect]`

Resolves [#1256](#1256)
Resolves [RUST-267](https://linear.app/getsentry/issue/RUST-267)
@linear-code

linear-code Bot commented Jul 21, 2026

Copy link
Copy Markdown

RUST-267

@szokeasaurusrex
szokeasaurusrex marked this pull request as ready for review July 21, 2026 14:47
@szokeasaurusrex
szokeasaurusrex requested a review from a team as a code owner July 21, 2026 14:47
@szokeasaurusrex
szokeasaurusrex force-pushed the szokeasaurusrex/disallow-allow branch from d6c3f8a to 7573887 Compare July 24, 2026 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enable allow_attributes clippy lint

1 participant